IDictionary(TKey, TValue).Remove Method

Task Parallel System.Threading

Removes the element with the specified key from the IDictionary<(Of <(TKey, TValue>)>).

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Private Function Remove ( _
	key As TKey _
) As Boolean Implements IDictionary(Of TKey, TValue).Remove
C#
bool IDictionary<TKey, TValue>.Remove(
	TKey key
)

Parameters

key
Type: TKey
The key of the element to remove.

Return Value

true if the element is successfully remove; otherwise false. This method also returns false if key was not found in the original IDictionary<(Of <(TKey, TValue>)>).

Implements

IDictionary<(Of <(TKey, TValue>)>)..::.Remove(TKey)

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionkey is a null reference (Nothing in Visual Basic).

See Also